import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///做适配
class Screen{
///适配宽度
  static double setWidth(double width){
    return ScreenUtil().setWidth(width);
  }
///适配高度
  static double setHeight(double height){
    return ScreenUtil().setHeight(height);
  }
///适配字体大小
  static double setFontSize(double size){

    return ScreenUtil().setSp(size);
  }
///获取当前context对应的element宽度
  static double width(BuildContext context){

    return MediaQuery.of(context).size.width;
  }
///获取当前context对应的element高度
  static double height(BuildContext context){

    return MediaQuery.of(context).size.height;
  }
}
